package com.teemo.dp.builder.demo1;

/**
 * @author Teemo
 */
public class Director {
    private ComputerBuilder computerBuilder;

    public Computer construct()
    {
        computerBuilder.buildCpu();
        computerBuilder.buildHardDisk();
        computerBuilder.buildMemory();
        return computerBuilder.getComputer();
    }

    public void setComputerBuilder(ComputerBuilder computerBuilder)
    {
        this.computerBuilder = computerBuilder;
    }
}
